import Vue from 'vue'
import Vuex from 'vuex'
import * as actions from './actions'
import * as mutations from './mutations'
import middlewares from './middlewares'
import subject from './modules/subject'
import roles from './modules/roles'
import student from './modules/student'
import user from './modules/user'
import grade from './modules/grade'
import auth from './modules/auth'
import city from './modules/city'
import agency from './modules/agency'
// import expenses from './modules/expenses'
import institution from './modules/institution'
import market_activities from './modules/market_activities'
import order from './modules/order'
import product from './modules/product'
import saler from './modules/saler'
import device from './modules/device'

Vue.use(Vuex)

const debug = process.env.NODE_ENV !== 'production'

export default new Vuex.Store({
  actions,
  modules: {
    subject,
    roles,
    student,
    user,
    grade,
    auth,
    city,
    agency,
    institution,
    market_activities,
    order,
    product,
    saler,
    device
  },
  plugins: middlewares,
  strict: debug,
})